package com.wzq.demo.controller;

import com.wzq.mvcframework.annotations.WzqController;
import com.wzq.mvcframework.annotations.WzqRequestMapping;
import com.wzq.mvcframework.annotations.WzqSecurity;

/**
 * @author wzq.Jolin
 * @company none
 * @create 2020-07-14 14:40
 */
@WzqController
@WzqSecurity(roles = {"jolin"})
@WzqRequestMapping("/security")
public class SecurityController {


    @WzqRequestMapping("/demo01")
    public String demo01(String username) {
        System.out.println(username + "验证通过");
        return "Welcome：" + username + "into: /security/demo01";
    }

    @WzqSecurity(roles = "wzq")
    @WzqRequestMapping("/demo02")
    public String demo02(String username) {
        System.out.println(username + "验证通过");
        return "Welcome：" + username + "into: /security/demo02";
    }

    @WzqSecurity(roles = {"zhangsan", "lisi"})
    @WzqRequestMapping("/demo03")
    public String demo03(String username) {
        System.out.println(username + "验证通过");
        return "Welcome：" + username + "into: /security/demo03";
    }

    @WzqRequestMapping("/demo04")
    public String demo04(String username) {
        System.out.println(username + "验证通过");
        return "Welcome：" + username + "into: /security/demo04";
    }
}
